class major:
    code = ""
    name = ""  # 专业名称
    level1_name = ""
    level2_name = ""
    level3_name = ""
    content = "",  # 专业简介
    celebrity = [],  # 名人
    main_course = "",  # 主要课程
    is_what = "",  # 是什么
    learn_what = "",  # 学什么
    do_what = "",  # 从事什么工作
    further_direction = [],  # 深造方向
    gril_percent = 0  # 女生占比
    science_percent = 0  # 理科学生占比
    study_year = ""  # 学制
    degree = ""  # 学位
    hot = 0,  # 热度
    key_words = [],  # 关键词
    job_rate_year = {}  # 就业率
    job_salary_experience = {}  # 就业经验薪资
    job_place = {}  # 就业地区
    job_industry = {}  # 就业行业
    job_post = {}  # 就业岗位
    score = {}  # 阳光高考评分

    def __init__(self, code="", name=""):
        self.code = code
        self.name = name

    def to_dict(self):
        return {
            "code": self.code,
            "name": self.name,
            "level1_name": self.level1_name,
            "level2_name": self.level2_name,
            "level3_name": self.level3_name,
            "content": self.content,
            "celebrity": self.celebrity,
            "main_course": self.main_course,
            "is_what": self.is_what,
            "learn_what": self.learn_what,
            "do_what": self.do_what,
            "further_direction": self.further_direction,
            "gril_percent": self.gril_percent,
            "science_percent": self.science_percent,
            "study_year": self.study_year,
            "degree": self.degree,
            "hot": self.hot,
            "key_words": self.key_words,
            "job_rate_year": self.job_rate_year,
            "job_salary_experience": self.job_salary_experience,
            "job_place": self.job_place,
            "job_industry": self.job_industry,
            "job_post": self.job_post,
            "score": self.score,
        }
